#ifndef HEROCLASS_H
#define HEROCLASS_H

#include "StatefulUnit.h"
#include "SimpleJoy.h"
#include "EffectCrosshair.h"

/*
Check Base Unit class for decription of most of the functions and vars
*/


class Hero : public StatefulUnit
{
public:
    Hero(const Vector2df p, const Vector2df v);
    ~Hero();

    virtual void hit(const SimpleDirection dir, BaseUnit* unit, CRstring parameter="");
    virtual void hitMap(MapData* const data, const CollisionObject* const obj);

    bool thinkTimeFinished() const {return m_thinkTime.hasFinished();};

    void handleInput(SimpleJoy* input);
    // Single movement functions
    void attack();
    void chargeThrow();
    void throwChild();
    void loseChild();
    void jump();
    void moveLeft();
    void moveRight();
    void duck();
    void standUp();
    void noInput();

    void addCoins(int coins)
    {
        /*unimplemented*/
    };

protected:
private:
    void customUpdate();
    CountDown m_thinkTime;
    bool m_canJump;
    bool m_isJumping;
    int m_jumpCounter; // counter used to adjust jump height depending on time the button is pressed
    EffectCrosshair* m_crosshair;
    float m_crosshairAngle;
};

#endif // HEROCLASS_H


